Conventional computer systems store information into files. The files can contain information used or produced by application programs, such as application data, other information or both.
When information in a file is updated, some conventional computer programs will replace the old information in the file with the new information, deleting from the file the old information. Even if the update only involves deleting the old information without replacing the old information with any new information, the old information is deleted from the file.
Other programs may mark the old information as deleted without actually deleting it from the storage device on which the file is stored, preserving the deleted information but marking the space it occupies as available for use. The old information is preserved until the space it occupies is used to store different information. Some conventional operating systems use this approach, preserving entire files which have been "deleted" by marking as available in a file allocation table the space used by the file.
Other programs make a limited attempt to preserve the most recent of the old information, even after new information is written. A conventional circular buffer may be employed for this purpose, storing new information in a portion of the file only in the space occupied by the oldest information in that portion of the file.
Still other programs preserve all of the old information in a file by writing new information in an unused area of the file. The information so stored is referred to as temporal if an indication of the effective period of the information is maintained.
Some applications make use of several of these approaches in the same file. For example, the Oracle8 product commercially available from Oracle Corporation of Redwood Shores, Calif. maintains a control file with different sections. The control file describes the arrangement of a database and the files used to store information about the database. A tablespace section contains the names and other information about the tablespaces in the database, with each tablespace containing one or more tables in the database. A datafiles section contains information such as the names of the files storing each tablespace, and describing the tablespace the file contains. A current redo log section stores the filename of the most current redo log, describing how to redo any transactions that are undone by the database program. An archived logs section stores filenames of a certain number of the most recent formerly current redo logs. A backup set logs section stores the filenames of a certain number of the most recent files describing information about backups made from the database.
Only the most current information is stored in the tablespace section. If a tablespace is dropped from the database, the name and other information about the tablespace is deleted from the control file. If information about the tablespace changes, the new information is written over the old information in the file.
The datafiles section contains current information about datafiles used in the database, but information about datafiles no longer used by the database program are marked for deletion and not actually deleted until information about a new datafile replaces the information that was marked for deletion.
The online redo log section is always current, with the name and other information about a new online redo log replacing information about an old online redo log. However, the information about the old online redo log is stored in the archived logs section of the control file using a circular buffer arrangement. The information formerly stored in the online redo log section is copied over the oldest set of information in the archived logs section, preserving information about a certain number of the most recent online redo logs.
The backup set log section is a circular buffer, with new backup set information overwriting the oldest information in that section of the file.
Some computer programs or portions of computer programs can be more accurate if current as well as non-current information is available to the program or portion of the program. For example, to restore some or all of the files of a database to a particular point in time, it is helpful to have the names of the tablespaces and the names of the files used to store such tablespaces and other files of the database as of the desired point in time. However, the control file described above does not provide all of the non-current information for the database. To restore the database to a point in time before the control file was extensively modified may be difficult or impossible only using the control file.
If the computer program or portion of the computer program that writes the file does not do so in a manner that preserves all of the non-current information desired by the other computer program or portion, either the program or portion that can use the non-current information may not be as efficient, or the program or portion that writes the file must be reprogrammed. Sometimes, such reprogramming is not possible, for example, if the vendor of the computer program that can use the non-current information is different from the vendor that provides the computer program that writes the file. Even if such reprogramming is possible, the expense of reprogramming the program that writes the file, and potentially reprogramming any other computer programs or portions that read the file using the current structure may be prohibitive.
A system and method are therefore needed to preserve non-current information overwritten in a computer file without reprogramming the computer program or portion of the computer program that writes the file.